Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KEP 88: Lifecycle Toolkit - Adding Instances to KeptnApp #90

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

thschue
Copy link
Contributor

@thschue thschue commented Feb 8, 2023

Signed-off-by: Thomas Schuetz [email protected]

Signed-off-by: Thomas Schuetz <[email protected]>
Signed-off-by: Thomas Schuetz <[email protected]>
@thschue thschue marked this pull request as ready for review February 8, 2023 12:49
- An instance has to be specified on the workload and application level
- If an instance is not specified, the lifecycle toolkit will assume that there is only a single instance of the workload or application
- If an instance is not specified on the workload level, the lifecycle toolkit will lookup the corresponding application and use the instance specified there
- Properties of an instance are defined in the `KeptnApp` resource
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also add the propagation of this info into the span via OTel attribute

Suggested change
- Properties of an instance are defined in the `KeptnApp` resource
- Properties of an instance are defined in the `KeptnApp` resource
- Properties of an instance are stored as attributes in the generated Spans


```

The `instance` property is used to specify the current instance of the application. If this property is not specified, the lifecycle toolkit will assume that there is only a single instance of the application called "single".
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `instance` property is used to specify the current instance of the application. If this property is not specified, the lifecycle toolkit will assume that there is only a single instance of the application called "single".
The `instance` property is used to specify the application's current instance. If this property is not specified, the lifecycle toolkit will assume that there is only a single instance of the application called "single".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest another name as default:

Suggested change
The `instance` property is used to specify the current instance of the application. If this property is not specified, the lifecycle toolkit will assume that there is only a single instance of the application called "single".
The `instance` property is used to specify the current instance of the application. If this property is not specified, the lifecycle toolkit will assume that there is only a single instance of the application called "main".
Suggested change
The `instance` property is used to specify the current instance of the application. If this property is not specified, the lifecycle toolkit will assume that there is only a single instance of the application called "single".
The `instance` property is used to specify the current instance of the application. If this property is not specified, the lifecycle toolkit will assume that there is only a single instance of the application called "default".

spec:
instance: <name of the current instance>
[...]
instances:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This schema would require having the same KeptnApp with the instances structure across (potentially) multiple repositories. The benefit of this proposal is that we have a complete overview of the instances' tree.
I suggest only storing the partial view in each KeptnApp, i.e., the next successors of the current instance. This way, if we want to add a successor to, let's say, production, we don't need to change the KeptnApp of dev, staging, etc.
As a drawback, this won't allow a complete overview in the KeptnApp definition and push this into the Observability platform via trace.

@malon875875
Copy link

  • An instance has to be specified on the workload and application level - agreed
    • Therefore KeptnApp will contain the information about the instance: dev - successor staging; staging - successor production….
  • For the reposecret, I am thinking we could use Sealed Secrets
  • Can Keptn LCT manage multiple instances across clusters k8-cluster-A.stage-dev -> k8-cluster-B.stage-test ?

@thschue
Copy link
Contributor Author

thschue commented Feb 14, 2023

  • An instance has to be specified on the workload and application level - agreed

    • Therefore KeptnApp will contain the information about the instance: dev - successor staging; staging - successor production….
  • For the reposecret, I am thinking we could use Sealed Secrets

  • Can Keptn LCT manage multiple instances across clusters k8-cluster-A.stage-dev -> k8-cluster-B.stage-test ?

Hello and thank you for your comments!

  • The KeptnApp would have all information needed to promote this through the stages
  • Although it might not be the best idea to introduce a dependency to external/sealed secrets in keptn, I think this might be a good thing to document as soon as the feature is available :-)
  • The management of multiple instances depends on the tasks which are using the structure which is defined here. This EP introduces the CRD changes needed to support multi-instance operations. The implementation of the promotion itself will be only a KeptnTask ... In my mind, this is possible as the promotion should happen via git (at least in a GitOps setup) and this is more or less independent on where the clusters are

@malon875875
Copy link

+1
I would love to see this PR implemented within the Keptn Roadmap

repository: <git repository>
branch: <git branch>
path: <path to the manifest>
reposecret: <secret to access the repository>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TC discussion: here we could use secretName and secretKey to fetch a K8s secret.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Planned
Development

Successfully merging this pull request may close these issues.

3 participants